-- GENERATED SPELL FOR [Eclipsion Bloodwarder] --


function spell0_19806(pUnit, Event) --@Blood Leech,Heal--
pUnit:FullCastSpellOnTarget(37838,pUnit)
pUnit:RegisterEvent('Sorts_19806', 594, 1)
end

function spell1_19806(pUnit, Event) --@Pummel,n/a--
pUnit:FullCastSpellOnTarget(38313,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19806', 5311, 1)
end

function spell2_19806(pUnit, Event) --@Summon Eclipsion Hawkstrider,n/a--
pUnit:FullCastSpellOnTarget(38311,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19806', 648, 1)
end

function Sorts_19806(pUnit, Event)
local choix_sorts_19806 = math.random(0, 2)
if choix_sorts_19806 == 0 then
pUnit:RegisterEvent('spell0_19806', 1, 1)
end
if choix_sorts_19806 == 1 then
pUnit:RegisterEvent('spell1_19806', 1, 1)
end
if choix_sorts_19806 == 2 then
pUnit:RegisterEvent('spell2_19806', 1, 1)
end
end

function mob19806_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19806', math.random(1500, 3000), 1)
end

function mob19806_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19806_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19806_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19806, 1, 'mob19806_Action')
RegisterUnitEvent(19806, 2, 'mob19806_Leave')
RegisterUnitEvent(19806, 3, 'mob19806_Kill')
RegisterUnitEvent(19806, 4, 'mob19806_Die')
